<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>v-show</title>
    <style>
        .active{
            color: green;
        }
    </style>
</head>
<body>
    <!-- v-bind -->
    <div id="app"> 
       {{msg}}<br/>
       <img v-bind:src="imgSrc" :title="myTitle"/><br/>
       <div :class="{active:isActive}">aaaa</div>
       <div :class="isActive ? 'active':'' ">bbb</div>
       <input type="button" value="ok" @click="changeStyle"/>
    </div>

    <script>
        var vue= new  Vue({
            
            el:"#app",
            data:{
                msg:"照片",
                imgSrc:'imges/cat.png',
                myTitle:'猫点赞',
                isActive:true
            },
            methods:{
                changeStyle(){
                    this.isActive=!this.isActive;
                }
            }
        })
    </script>
</body>
</html>